Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not verify lengths in propWithModel #91

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Do not verify lengths in propWithModel #91

merged 1 commit into from
Jul 29, 2024

Conversation

martijnbastiaan
Copy link
Member

@martijnbastiaan martijnbastiaan commented Jul 20, 2024

The input length is not always equal to the output length, nor even predictable. Furthermore, some properties might not be interested in the length in the first place.

Fixes #81

@martijnbastiaan martijnbastiaan force-pushed the fix81 branch 2 times, most recently from 5b3cf68 to 4a3dfbf Compare July 20, 2024 08:48
Copy link
Member

@lmbollen lmbollen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm modulo some small remarks.
Please remember to make an issue for the maximum number of consecutive stalls.

src/Protocols/Hedgehog/Internal.hs Outdated Show resolved Hide resolved
src/Protocols/Hedgehog/Internal.hs Outdated Show resolved Hide resolved
src/Protocols/Hedgehog/Internal.hs Show resolved Hide resolved
src/Protocols/Hedgehog/Internal.hs Outdated Show resolved Hide resolved
Comment on lines +65 to +74
smallInt :: H.Range Int
smallInt = Range.linear 0 10

genSmallInt :: H.Gen Int
genSmallInt =
Gen.frequency
[ (90, Gen.integral smallInt)
, (10, Gen.constant (Range.lowerBound 99 smallInt))
]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consecutive stalling up to only 10 cycles is a very low default.
This should be configurable or derived from configuration? Could you make an issue and point to it here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added! #98

The input length is not always equal to the output length, nor even
predictable. Furthermore, some properties might not be interested in the
length in the first place.

Fixes #81
@lmbollen lmbollen enabled auto-merge (squash) July 29, 2024 09:15
@lmbollen lmbollen merged commit 9792345 into main Jul 29, 2024
7 checks passed
@lmbollen lmbollen deleted the fix81 branch July 29, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

propWithModel and friends should not verify lengths
2 participants